package IO.字符流;

import com.mchange.io.FileUtils;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class CharacterStream {
    public static void main(String[] args) throws IOException {
        File file = new File("D:/IOFile/test/word.txt");
        //写出
        FileWriter fileWriter = new FileWriter(file);
        fileWriter.write("hello world1");
        fileWriter.close();
        //读入
        FileReader fileReader = new FileReader("D:\\IOFile\\test\\word.txt");
        int i = fileReader.read();
        System.out.println((char) i);
      /*  int i1 = fileReader.read();
        System.out.println((char) i1);
        int i2 = fileReader.read();
        System.out.println((char) i2);*/


    }
}
